package com.lagou.Utils;

import com.lagou.pojo.PageSysParm;

/**
 * @program: springboot04_blog
 * @description: 操作servler中的参数
 * @author: zhoushiduo
 * @create: 2020-12-15 09:23
 */
public class MyServletUtils {

    /**
     * 存放前段传递过来的请求页码
     */
    private static ThreadLocal<PageSysParm> localPageSysParm = new ThreadLocal<>();

    public static PageSysParm getLocalPageSysParm() {
        return localPageSysParm.get();
    }

    public static void setLocalPageSysParm(Integer pageNum, Integer pageSize) {
        PageSysParm pageSysParm = new PageSysParm();
        pageSysParm.setPageNum(pageNum);
        pageSysParm.setPageSize(pageSize);
        localPageSysParm.set(pageSysParm);
    }
}
